HTMLify
style.css
Views: 16 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | /*===== GOOGLE FONTS =====*/ @import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap"); /*===== VARIABLES CSS =====*/ :root { --dark-color-lighten: #f2f5ff; --red-card: #a62121; --blue-card: #4bb7e6; --btn: #141414; --btn-hover: #3a3a3a; --text: #fbf7f7; } /*===== RESET =====*/ *, ::before, ::after { margin: 0; padding: 0; box-sizing: border-box; } body { margin: 0; padding: 0; box-sizing: border-box; height: 100vh; width: 100vw; background-color: var(--dark-color-lighten); font-family: "Montserrat", sans-serif; } button { font-family: "Montserrat", sans-serif; display: inline-block; border: none; outline: none; border-radius: 0.2rem; color: var(--text); cursor: pointer; } a { text-decoration: none; } img { max-width: 100%; height: 100%; user-select: none; } /*===== CARD =====*/ .container { height: 100%; width: 850px; margin: auto; display: flex; align-items: center; justify-content: space-evenly; } .card { position: relative; padding: 1rem; width: 350px; height: 450px; box-shadow: -1px 15px 30px -12px rgb(32, 32, 32); border-radius: 0.9rem; background-color: var(--red-card); color: var(--text); cursor: pointer; } .card-blue { background: var(--blue-card); } .product-image { height: 230px; width: 100%; transform: translate(0, -1.5rem); transition: transform 500ms ease-in-out; filter: drop-shadow(5px 10px 15px rgba(8, 9, 13, 0.4)); } .product-info { text-align: center; } .card:hover .product-image { transform: translate(-1.5rem, -7rem) rotate(-20deg); } .product-info h2 { font-size: 1.4rem; font-weight: 600; } .product-info p { margin: 0.4rem; font-size: 0.8rem; font-weight: 600; } .price { font-size: 1.2rem; font-weight: 500; } .btn { display: flex; justify-content: space-evenly; align-items: center; margin-top: 0.8rem; } .buy-btn { background-color: var(--btn); padding: 0.6rem 3.5rem; font-weight: 600; font-size: 1rem; transition: 300ms ease; } .buy-btn:hover { background-color: var(--btn-hover); } .fav { box-sizing: border-box; background: #fff; padding: 0.5rem 0.5rem; border: 1px solid#000; display: grid; place-items: center; } .svg { height: 25px; width: 25px; fill: #fff; transition: all 500ms ease; } .fav:hover .svg { fill: #000; } @media screen and (max-width: 800px) { body { height: auto; } .container { padding: 2rem 0; width: 100%; flex-direction: column; gap: 3rem; } } |